<template>
    <div>
        欢迎您：{{mobile}}
        <table>
            <tr>
                <td>id</td>
                <td>手机号</td>
            </tr>
            <tr v-for='i in userlist'>
                <td>{{i.id}}</td>
                <td>{{i.mobile}}</td>
            </tr>
        </table>
    </div>
</template>

<script>
    export default {
        data(){
            return{
                mobile:localStorage.getItem('mobile'),
                userlist:[]
            }
        },
        methods:{
            getuserlist(){
            this.$axios.get('users/userlist').then(res=>{
                this.userlist = res.data.list
            })
        }
        },
        mounted(){
            this.getuserlist()
        }

        
    }
</script>

<style scoped>

</style>